std::bitset::operator&=,|=,^=,^
From Cppreference
| C++ Standard Library | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Utilities library | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| std::bitset | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bitset<N>& operator&=( const bitset<N>& other );
| (1) | |
| bitset<N>& operator|=( const bitset<N>& other );
| (2) | |
| bitset<N>& operator^=( const bitset<N>& other );
| (3) | |
| bitset<N> operator^() const;
| (4) | |
Performs binary AND, OR, XOR and NOT.
1) Sets the bits to the result of binary AND on corresponding pairs of bits of *this and other.
2) Sets the bits to the result of binary OR on corresponding pairs of bits of *this and other.
3) Sets the bits to the result of binary XOR on corresponding pairs of bits of *this and other.
4) Sets the bits to the result of binary XOR on corresponding pairs of bits of *this and *this. Equivalent to NOT operation, or flip().
Contents |
[edit] Parameters
| other | - | another bitset |
[edit] Return value
1-3) *this
4) new bitset containing the negated bits
[edit] Example
| This section is incomplete |
[edit] See also
| performs binary shift left and shift right (public member function) | |